package com.ziyun.erp.modules.frozenGoods.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.frozenGoods.dao.FrozenGoodsDao;
import com.ziyun.erp.modules.frozenGoods.entity.FrozenGoodsEntity;
import com.ziyun.erp.modules.frozenGoods.service.FrozenGoodsService;


@Service("frozenGoodsService")
public class FrozenGoodsServiceImpl extends ServiceImpl<FrozenGoodsDao, FrozenGoodsEntity> implements FrozenGoodsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<FrozenGoodsEntity> page = this.selectPage(
                new Query<FrozenGoodsEntity>(params).getPage(),
                new EntityWrapper<FrozenGoodsEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public void unfreezeBySellerId(Long sellerId, String unfreezeName) {
        this.baseMapper.unfreezeBySellerId(sellerId,unfreezeName);
    }

}
